﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="SilverAlgebra.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d3="clr-namespace:Microsoft.Research.DynamicDataDisplay;assembly=DynamicDataDisplay.Silverlight"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:my="clr-namespace:SilverAlgebra" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">

    <toolkit:DockPanel LastChildFill="True" >

        <toolkit:Expander  ExpandDirection="Right" IsExpanded="True"  toolkit:DockPanel.Dock="Left">
            <my:AlgebraTextBox  x:Name="algebraTextBox1"  />
        </toolkit:Expander>
        <toolkit:Expander  IsExpanded="True" Height="Auto" ExpandDirection="Right" >
            <toolkit:DockPanel LastChildFill="True" >
                <toolkit:WrapPanel toolkit:DockPanel.Dock="Top" Background="Yellow" Margin="0,2,0,5">
                    <sdk:Label Content="Expression: " />
                    <TextBox x:Name="ExpressionTextBox" Text="(5*sin(x)^4)|x" Background="LightYellow" />
                </toolkit:WrapPanel>
                <toolkit:WrapPanel toolkit:DockPanel.Dock="Top">
                    <sdk:Label>Minimum</sdk:Label>
                    <TextBox x:Name="MinimumTextBox" Text="-10" Margin="5,0,5,2" />
                    <sdk:Label>Maximum</sdk:Label>
                    <TextBox x:Name="MaximumTextBox" Text="10"  Margin="5,0,5,2" />
                    <sdk:Label>Interval</sdk:Label>
                    <TextBox x:Name="IntervalTextBox" Text="0.1"  Margin="5,0,5,2"  />
                    <sdk:Label>Variable</sdk:Label>
                    <TextBox x:Name="VariableTextBox" Text="x"  Margin="5,0,5,2" ></TextBox>
                    <Button x:Name="EvaluateButton" Click="EvaluateButton_Click"  Margin="5,0,5,2" >Evaluate</Button>
                </toolkit:WrapPanel>

                <toolkit:WrapPanel toolkit:DockPanel.Dock="Top" Background="Yellow" Margin="0,5,0,2">
                    <sdk:Label Content="Result: " />
                    <TextBlock x:Name="ExpressionResult"  />
                    
                </toolkit:WrapPanel>


                <!-- Parameters Panel -->
                <StackPanel x:Name="ParametersPanel" toolkit:DockPanel.Dock="Top">
                    
                </StackPanel>
                <d3:Chart x:Name="D3Chart">
                    <d3:LineGraph Stroke="Blue" StrokeThickness="1" x:Name="lgraph">
                        
                    </d3:LineGraph>
                </d3:Chart>
            </toolkit:DockPanel>
        </toolkit:Expander>
    
    </toolkit:DockPanel>
</UserControl>
